import React from 'react';
import { Layout } from 'antd';
import { connect } from 'react-redux';
import { Menu,Button} from 'antd';
import { MailOutlined, AppstoreOutlined, SettingOutlined,ExportOutlined} from '@ant-design/icons';
import {useState,useEffect} from 'react'
import {Link} from 'react-router-dom'

const { SubMenu } = Menu;

import styles from './styles.module.less';
import './index.css'
import MenuItem from 'antd/lib/menu/MenuItem';

const { Header } = Layout;

const mapStateToProps = state => ({ user: state.user });

export default connect(
    mapStateToProps
)((props) => {
    const [state,newState] = useState('mail')
    useEffect(()=>{

    },[])
    function handleClick(){
        console.log('注销')
    }
    return (
        <Header className={ styles.header }>
            <Menu selectedKeys={[state]} mode="horizontal" className='mainItem'>
            <Menu.Item key="mail" className='mainPage'>
            <Link to='/admin/AdminHotMap' style={{ textDecoration:'none',color:'#668B8B'}}>
              主页                 
            </Link>
            </Menu.Item>
            <Button icon={<ExportOutlined />} className='button' onClick={handleClick}>
            注销
            </Button>
            </Menu>
        </Header>
    )
})

